package com.merchant.serviceimpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.merchant.dao.RedpacketDao;
import com.merchant.pojo.Redpacket;
import com.merchant.service.RedpacketSeivice;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
@Service
public class ReadpacketServiceImpl implements RedpacketSeivice {
    @Autowired
    RedpacketDao redpacketDao;
    @Override
    public List<Redpacket> findAll() {
        return redpacketDao.findAll();
    }

    @Override
    public List<Redpacket> findBytype(String rtype) {
        return redpacketDao.findBytype(rtype);
    }

    @Override
    public boolean updateRedpacke(Redpacket redpacket) {
        return redpacketDao.updateRedpacke(redpacket)>0?true:false;
    }

    @Override
    public boolean addRedpacke(Redpacket redpacket) {
        return redpacketDao.addRedpacke(redpacket)>0?true:false;
    }
}
